﻿<#import "/common/function.ftl" as fn>
<@fn.header _title="">
</@fn.header>
<script type="text/javascript" src="${base}/resources/script/jquery.validate.js"></script>
<script type="text/javascript" src="${base}/resources/script/jquery.validate.methods.js"></script>
<script type="text/javascript" src="${base}/resources/common/js/jquery.md5.js"></script>
<script type="text/javascript">
$(function() {
	var $validateErrorContainer = $("#validateErrorContainer");
	var $validateErrorLabelContainer = $("#validateErrorContainer ul");
	var $validateForm = $("#validateForm");
	
	// 表单验证
	$validateForm.validate({
		errorContainer: $validateErrorContainer,
		errorLabelContainer: $validateErrorLabelContainer,
		wrapper: "li",
		errorClass: "validateError",
		ignoreTitle: true,
		rules: {
			"oldPassword": "required",
			"newPassword": "required",
		},
		messages: {
			"oldPassword": "请填写原密码",
			"newPassword": "请填写新密码",
		},
		submitHandler: function(form) {
			$(form).find(":submit").attr("disabled", true);
			$("#oldPassword").val($.md5($("#oldPassword").val()));
			$("#newPassword").val($.md5($("#newPassword").val()));
			form.submit();
		}
	});	
});

</script>
<body style="width:100%" class="list">
<form id="validateForm" action="dochangepassword" method="post">
	<h2><img src="${base}/resources/style/images/iconDivM.gif" width="16" height="16" />用户管理</h2>
	<div class="title marginTop15">
		<div class="title-middle">
			<div class="title-left"></div>
			<div class="title-caption">修改密码</div>
            <div class="title-right"></div>
		</div>
	</div>
	<input type="hidden" name="id" value="${id}"/>
	<table class="table3" id="userListTable">
		<tr><th>旧密码</th><td><input type="password" name="oldPassword" class="formText" value="" /> <label class="requireField"><font style="font-weight:bold">${(error)!}</font>*</label></td></tr>
		<tr><th>新密码</th><td><input type="password" name="newPassword" class="formText" value="" /> <label class="requireField">*</label></td></tr>
	</table>
	<input type="submit" class="button" value="确 定" />
	<input type="button" class="button" value="返 回" onclick="javascript:history.go(-1);" />
</form>
</body>
</html>